<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%@page import="java.util.*" %>
    <%@page import="Dao.*" %>
    <%@page import="Entity.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>学习资源搜索结果</title>
</head>
<body>
<style type="text/css">
table.dataintable {
	border: 1px solid #888888;
	border-collapse: collapse;
	font-family: Arial, Helvetica, sans-serif;
	margin-top: 10px;
	width: 100%;
}

table.dataintable th {
	background-color: #CCCCCC;
	border: 1px solid #888888;
	padding: 5px 15px 5px 5px;
	text-align: left;
	vertical-align: baseline;
}

table.dataintable td {
	background-color: #EFEFEF;
	border: 1px solid #AAAAAA;
	padding: 5px 15px 5px 5px;
	vertical-align: text-top;
}
</style>
<link rel="stylesheet" href="<%=request.getContextPath() %>/css/administratorPage.css" type="text/css"></link>
<div class="header">
		<font size='6' color="#FF0000"><br />&emsp;&emsp;&emsp;学习资源搜索结果</font>
	</div>
	<table class="dataintable">
<tr>
<td align="center">资源ID</td>
			<td align="center">标签</td>
			<td align="center">资源名称</td>
			<td align="center">上传者ID</td>
			<td align="center">上传时间</td>
			<td align="center">文件路径</td>
			<td align="center">点赞数</td>
			<td align="center">简要介绍</td>
			<td align="center"><a
				href="/UniversityResourceSystem/releaseLearningResource.jsp"
				target="_blank"> <input type="button" class="mybutton"
					value="发布学习资源" text-align:right />
			</a></td>
			</tr>
		<%
		String label=request.getParameter("label");
		List<LearningResource> lrlist=new LearningResourceDao().queryLearningResourceByLabel(label);
		for(LearningResource lr:lrlist){
		%>
		<tr>
		<td><input type="text" value=<%=lr.getResourceID() %>></td>
		<td><input type="text" value=<%=lr.getLabel() %>></td>
		<td><input type="text" value=<%=lr.getResourceName() %>></td>
		<td><input type="text" value=<%=lr.getUploaderID() %>></td>
		<td><input type="text" value=<%=lr.getUploadTime() %>></td>
		<td><input type="text" value=<%=lr.getFilePath() %>></td>
		<td><input type="text" value=<%=lr.getThumbNumber() %>></td>
		<td><input type="text" value=<%=lr.getBriefIntroduce() %>></td>
		<td><form action="/UniversityResourceSystem/RemoveUploadedFileServlet">
		<input type="hidden" name="status" value="admin">
			<input type="hidden" name="resourceID" value=<%=lr.getResourceID() %>>
			<input type="hidden" name="filePath" value=<%=lr.getFilePath() %>>
			<input type="submit" value="删除"/>  <!-- 注意：如果用超链接传参，只能是get方法，而tomcat中get方法不支持一些特殊字符：/，\....因此只能post传过去 -->
			</form></td>
		</tr>
		<%} %>
</table>
</body>
</html>